package com.rtu.enums;


public class AccessToken {
	private String accessToken;
	private Long expireTime;
	private String data;
	
	
	public AccessToken(String accessToken, Long expireIn, String data) {
		super();
		this.accessToken = accessToken;
		this.expireTime = (Long)(System.currentTimeMillis()+(expireIn)*1000);
		this.data = data;
	}

	public AccessToken(String accessToken,Long  expireIn) {
		super();
		this.accessToken = accessToken;	
		this.expireTime = (Long)(System.currentTimeMillis()+(expireIn)*1000);
	}
	
	public boolean isExpired() {
		return System.currentTimeMillis()> expireTime;
	}
	
	public String getAccessToken() {
		return accessToken;
	}
	public void setAccessToken(String accessToken) {
		this.accessToken = accessToken;
	}
	public Long getExpireTime() {
		return expireTime;
	}
	public void setExpireTime(Long expireTime) {
		this.expireTime = expireTime;
	}

	public String getData() {
		return data;
	}

	public void setData(String data) {
		this.data = data;
	}

}